import os

cpppath = ['.']
libpath = []
libs    = []

preciceRootPath = os.getenv('PRECICE_ROOT')
cpppath.append(preciceRootPath + '/src/')

# Libs
libpath.append(preciceRootPath + '/build/last/')
libs.append('precice')

fortranCompiler = 'gfortran'

envCompile = Environment ( 
   F90        = fortranCompiler,
   F77        = fortranCompiler,
   FORTRAN    = fortranCompiler,
   CPPPATH    = cpppath,
   LIBPATH    = libpath,
   LIBS       = libs,
   ENV        = os.environ  # propagates environment variables to scons  
   )
  
envCompile.Object('solverdummy.f90')


envLink = envCompile.Clone(tools=[fortranCompiler],F90=fortranCompiler,LINK=fortranCompiler)
envLink.Program(target='solverdummy', source = ['solverdummy'])
